<template>
  <el-form :inline="true" class="search-form">
    <div>
      <el-form-item label="资源名称">
        <el-input v-model="name" placeholder="请输入资源名称" ></el-input>
      </el-form-item>
      <el-form-item label="资源路径">
        <el-input v-model="url" placeholder="请输入资源路径" ></el-input>
      </el-form-item>
      <el-form-item>
        <el-button @click="search" class="newButtonColor SearchBTN">查询</el-button>
        <el-button @click="reset" class="SearchBTN cancelBTN">清空</el-button>
      </el-form-item>
    </div>
  </el-form>
</template>

<script>
  import isNil from 'lodash/isNil';

  export default {
    data() {
      return {
          url: '',
          name:'',
      };
    },
    watch:{
    	url(a){
    		this.$parent.$parent.$parent.$refs.biaoge.url = a;
    	},
    	name(a){
    		this.$parent.$parent.$parent.$refs.biaoge.name = a;
    	},
    },
    methods: {
      search(){

          this.$parent.$parent.$parent.$refs.biaoge.parentId = '';
          this.$parent.$parent.$parent.$refs.biaoge.query()

      },
      reset(){
        this.name = '';
        this.url = '';
      }
    }
  };
</script>

<style lang="scss" scoped>
  .el-form-item {
    margin-bottom: 0px;
  }
</style>
